package com.moody.hibernate.domain;

/**
 * DebtCollateralId entity. @author MyEclipse Persistence Tools
 */

public class DebtCollateralId implements java.io.Serializable {

	// Fields

	private String debtNo;
	private String collateralId;

	// Constructors

	/** default constructor */
	public DebtCollateralId() {
	}

	/** full constructor */
	public DebtCollateralId(String debtNo, String collateralId) {
		this.debtNo = debtNo;
		this.collateralId = collateralId;
	}

	// Property accessors

	public String getDebtNo() {
		return this.debtNo;
	}

	public void setDebtNo(String debtNo) {
		this.debtNo = debtNo;
	}

	public String getCollateralId() {
		return this.collateralId;
	}

	public void setCollateralId(String collateralId) {
		this.collateralId = collateralId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof DebtCollateralId))
			return false;
		DebtCollateralId castOther = (DebtCollateralId) other;

		return ((this.getDebtNo() == castOther.getDebtNo()) || (this
				.getDebtNo() != null
				&& castOther.getDebtNo() != null && this.getDebtNo().equals(
				castOther.getDebtNo())))
				&& ((this.getCollateralId() == castOther.getCollateralId()) || (this
						.getCollateralId() != null
						&& castOther.getCollateralId() != null && this
						.getCollateralId().equals(castOther.getCollateralId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getDebtNo() == null ? 0 : this.getDebtNo().hashCode());
		result = 37
				* result
				+ (getCollateralId() == null ? 0 : this.getCollateralId()
						.hashCode());
		return result;
	}

}